<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>原材料总经理审核</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="stylesheet" href="../../res/layuis/css/layui.css">
   <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
   <script type="text/javascript" src="../../res/layuis/layui.js" charset="utf-8"></script>
</head>
<body>
<div class="demoTable" style="margin-top: 10px;">
      <div class="layui-input-inline">
      <form class="layui-form" action="">
      
          <div class="layui-input-inline" style="width:224px;">
		      <select name="supplierId" lay-filter="aihao" id="supplierId" lay-search >
		       	<option value="">请选择供应商</option>
		      </select>
   		 </div>
   		 
   		 <div class="layui-input-inline" style="width:224px;">
		      <select name="auditingStatus" lay-filter="aihao" id="auditingStatus" lay-search >
		       	<option value="">请选择审核状态</option>
				<option value="1">等待财务审核</option>
				<option value="2">等待总经理审核</option>
				<option value="3">已通过审核</option>
				<option value="4">未通过审核</option>
				<option value="5">已通过审核,已提交质检</option>
			  </select>
   		 </div>
        
      </form>
      </div>
       <div class="layui-input-inline">
      	<button class="layui-btn" id="search" data-type="reload" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
      </div>
<table class="layui-table"  lay-filter="demo" id="generalManagerAuditing">
   
</table>
<script type="text/javascript">

layui.use('table',function(){
	  var table = layui.table;
	  var form = layui.form;
	  
	  table.render({
		    elem: '#generalManagerAuditing'
		    	,page: true
		    ,url:'../../listenPurchase/materialFindAll.action?noAuditingStatus=0'
		    ,cols: [[
		       {field:'purchaseId', align:'center'}
		      ,{field:'oper',title: '操作人', align:'center',width:'8%'}
		      ,{field:'purchaseStringTime',title: '采购时间', align:'center',sort:true,width:'16%'}
		      ,{field:'purchasePrice',title: '采购金额', align:'center',width:'8%'}
		      ,{field:'purchaseNumber',title: '采购数量', align:'center',width:'8%'}
		      ,{field:'supplierId',title: '供应商', align:'center',width:'16%'}
		      ,{field:'auditingStatus',title: '审核状态', align:'center',templet:'#auditingType',width:'16%'}
		      ,{field:'purchaseExplain',title: '采购说明', align:'center',width:'8%'}
		      ,{field:'right', align:'center', toolbar: '#look',title:'查看详情',width:'16%',fixed: 'right'}
		      ,{field:'right', align:'center', toolbar: '#barDemo',title:'操作',width:'5%',fixed: 'right'}
		    ]],done: function (res, curr, count) {
	            $("[data-field='purchaseId']").css('display','none');
	           
		    }
		  });
	  
	 
});
</script>
<script type="text/html" id="auditingType">
{{# if(d.auditingStatus == 1) { }}
     <div>等待财务审核</div>
 	 {{# } else if(d.auditingStatus == 2){ }}
    <div>等待总经理审核</div>
     {{# } else if(d.auditingStatus == 3){ }}
    <div>已通过审核</div>
 	 {{# } else if(d.auditingStatus == 4){ }}
    <div>未通过审核</div>
	{{# } else if(d.auditingStatus == 5){ }}
    <div>已通过审核,已提交质检</div>
{{# }}}
</script>
<script type="text/html" id="look">
  <a class="layui-btn layui-btn-xs" lay-event="purchaseDetail">订单详细</a>
  <a class="layui-btn layui-btn-xs" lay-event="auditingDetail">审核记录</a>
</script>
<script type="text/html" id="barDemo">
{{# if(d.auditingStatus == 1) { }}
      <a class="layui-btn layui-btn-disabled layui-btn-xs">审核</a>
 	 {{# } else if(d.auditingStatus == 2){ }}
     <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="audit">审核</a>
     {{# } else if(d.auditingStatus == 3){ }}
   	<a class="layui-btn  layui-btn-disabled layui-btn-xs">审核</a>
 	 {{# } else if(d.auditingStatus == 4){ }}
    <a class="layui-btn  layui-btn-disabled layui-btn-xs">审核</a>
	{{# } else if(d.auditingStatus == 5){ }}
    <a class="layui-btn  layui-btn-disabled layui-btn-xs">审核</a>
{{# }}}
</script>
 </div>
<script src="../../res/js/materialAuditing/generalManagerAuditing.js" charset="utf-8"></script>

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->

</body>
</html>